Teacher Version

Hero Image
Hero Image

Procedural Mistakes

Procedural Mistakes

A common mistake that you may run into while programming is forgetting to do the little things. This could be as simple as forgetting to shut a motor off, or even setting the wrong parameter value. These mistakes tend to be the hardest to find because the program will compile successfully. Suppose you wanted to make the robot move forward for 9 seconds, but you forget to change rotations to seconds. Your program will compile and run, but your robot will move forward 9 rotations instead of 9 seconds. You will not know that anything is wrong until you actually get to test it.

In this activity, you will be given a program that successfully compiles, but the program is not doing what it is supposed to do. Your task will be to add, remove, and fix commands so that your program runs correctly. You can find the steps that your program must follow in the comments section in the program.

Debugging Program: b_DebugComments.rbg

© 2016 Robomatter, Inc.

Portions of this product are manufactured under license from Carnegie Mellon University.